﻿using KwaiXiaoDian.Entity.DO;
using KwaiXiaoDian.Entity.VO.User;
using SSharing.Frameworks.NetCore.Common.Results;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KwaiXiaoDian.IService
{
    /// <summary>
    /// 用户service
    /// </summary>
    public interface IUserService : IBaseService<TUser>
    {
        /// <summary>
        /// 保存帐号信息
        /// </summary>
        /// <param name="request"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Tuple<bool, string> SaveUserInfo(SaveUserInfoRequest request, long userId);

        /// <summary>
        /// 依据角色获取用户菜单
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        IList<UserMenu> GetUserMenus(string role);

        /// <summary>
        /// 获取用户列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        IPagingResult<UserModel> GetPagingUsers(GetPagingUsersRequest request);

        /// <summary>
        /// 新增用户
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Tuple<bool, string> Add(AddUserRequest request);

        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Tuple<bool, string> Update(UpdateUserRequest request);

        /// <summary>
        /// 禁用启用
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Tuple<bool, string> DisableUser(DisableUserRequest request);

        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Tuple<bool, string> ResetPwd(ResetPwdRequest request, long userId);

    }
}
